import * as Tone from 'tone'
import Samples from './Samples'
const lpf = new Tone.Filter(1000, "lowpass")

const sw = new Tone.StereoWidener(0.5)

class Piano {

    constructor(cb: any) {
        // @ts-ignore
        this.sampler = new Tone.Sampler(Samples, () => {
            cb()
        }).chain(lpf, sw, Tone.getDestination())
    }

    sampler() {
        return this.sampler;
    }
}

export default Piano;